package com.niiwoo.civet.trade.dao.mapper;

import com.niiwoo.civet.trade.dao.entity.CreditorTransferConfirmOrderDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface CreditorTransferConfirmOrderDetailMapperExt extends CreditorTransferConfirmOrderDetailMapper {

    CreditorTransferConfirmOrderDetail selectByPrimaryKeyForUpdate(
            @Param("id") Long id);

    List<CreditorTransferConfirmOrderDetail> queryCreditorTransferConfirmOrderDetailByCreditorSaleDetailId(@Param("creditorSaleDetailId") Long creditorSaleDetailId);

    List<CreditorTransferConfirmOrderDetail> queryFailedCreditorTransferConfirmOrderDetailByCreditorSaleDetailId(@Param("creditorSaleDetailId") Long creditorSaleDetailId);

    Integer queryCreditorTransferConfirmOrderDetailNotSuccessNumByCreditorSaleDetailId(@Param("creditorSaleDetailId") Long creditorSaleDetailId);

    List<CreditorTransferConfirmOrderDetail> queryCreditorTransferConfirmOrderDetailByBankTransferResultQueryJob();

    List<CreditorTransferConfirmOrderDetail> queryCreditorTransferConfirmOrderDetailByBankTransferFailedJob();

    CreditorTransferConfirmOrderDetail queryCreditorTransferConfirmOrderDetailByDetailRequestNo(
            @Param("detailRequestNo") String detailRequestNo);
}
